package Server;

import java.io.IOException;
import java.net.ServerSocket;
import java.net.Socket;

public class Server implements Runnable{
	private int port = 64000;
	private ServerSocket server;
		
	public Server(){	
		try{
			server = new ServerSocket(port);			
		}catch(IOException e){
			System.out.println(e);
			e.printStackTrace();
		}
		new Thread(this).start();
	}
	
	@Override
	public void run() {	
		while(true){
			try{
				Socket socket = server.accept();
				
				new ClientHandler(socket);
			}catch(IOException e){
				e.printStackTrace();
			}
		}
	}	
}
